package com.ssy.lingxi.member.merchant.model.vo.maintenance.request;

import com.ssy.lingxi.member.merchant.api.handler.annotation.PhoneAnno;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.Map;

/**
 * 平台后台 - 会员维护 - 新增会员接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-07-14
 */
public class PlatformAddMemberVO implements Serializable {
    private static final long serialVersionUID = -2499504635345136153L;

    /**
     * 会员类型枚举值
     */
    @NotNull(message = "会员类型Id不能为空")
    @Positive(message = "会员类型Id要大于0")
    private Long memberTypeId;

    /**
     * 角色Id
     */
    @NotNull(message = "角色Id不能为空")
    @Positive(message = "角色Id要大于0")
    private Long roleId;

    /**
     * 会员等级
     */
    private Integer level;

    /**
     * 国家代码枚举值
     */
    @NotNull(message = "国家代码Id不能为空")
    @Positive(message = "国家代码Id要大于0")
    private Long countryCodeId;

    /**
     * 手机号码
     */
    @NotNull(message = "手机号码不能为空")
    @PhoneAnno
    private String phone;

    /**
     * 邮箱，可为空
     */
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 会员注册资料，Map对象类型
     * Key为获取页面内容接口返回的fieldName，value为用户填写的内容
     */
    private Map<String, Object> detail;

    public Long getMemberTypeId() {
        return memberTypeId;
    }

    public void setMemberTypeId(Long memberTypeId) {
        this.memberTypeId = memberTypeId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Long getCountryCodeId() {
        return countryCodeId;
    }

    public void setCountryCodeId(Long countryCodeId) {
        this.countryCodeId = countryCodeId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Map<String, Object> getDetail() {
        return detail;
    }

    public void setDetail(Map<String, Object> detail) {
        this.detail = detail;
    }
}
